package AdminController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import Dao.AdminDao;

public class ReserView implements Controller {
	
	private AdminDao admindao;
	
	public void setAdminDao(AdminDao admindao) {
		this.admindao = admindao;
	}

	@Override
	public ModelAndView handleRequest(HttpServletRequest arg0,
			HttpServletResponse arg1) throws Exception {

		String re_no = (String)arg0.getParameter("RV_NO"); //선택한 공지글 번호
		
		
		Object reserDetail = admindao.getReserDetail(re_no);
		
		/*HttpSession session = request.getSession();
		session.setAttribute("notice_no", noticeDetail.getNotice_no());
		session.setAttribute("title", noticeDetail.getTitle());
		session.setAttribute("contents", noticeDetail.getContents());*/
		
		ModelAndView mv = new ModelAndView();
		mv.addObject("reserDetail",reserDetail);
		mv.setViewName("Reser_view");
		
		return mv;
	}

}
